import static org.junit.Assert.*;

import org.junit.Test;

/**
 * 
 */

/**
 * @author DAM_S
 *
 */
public class CadenaTest {

	Cadena cadena=new Cadena();
	/**
	 * Test method for {@link Cadena#longitud(java.lang.String)}.
	 */
	@Test
	public void testLongitud() {
		assertEquals(cadena.longitud("Hola"),4);
	}
	
	@Test
	public void testLongitud2(){
		assertEquals(cadena.longitud(""),0);
	}

	/**
	 * Test method for {@link Cadena#vocales(java.lang.String)}.
	 */
	@Test
	public void testVocales() {
		assertEquals(cadena.vocales("Hola"),2);
	}
	@Test
	public void testVocales2() {
		assertEquals(cadena.vocales(""),0);
	}

	/**
	 * Test method for {@link Cadena#invertir(java.lang.String)}.
	 */
	@Test
	public void testInvertir() {
		assertEquals(cadena.invertir("Hola"),"aloH");
	}

	@Test
	public void testInvertir2() {
		assertEquals(cadena.invertir(""),"");
	}
	/**
	 * Test method for {@link Cadena#contarLetra(java.lang.String, char)}.
	 */
	@Test
	public void testContarLetra() {
		assertEquals(cadena.contarLetra("Hola don pepito", 'o'),3);
	}
	
	@Test
	public void testContarLetra2() {
		assertEquals(cadena.contarLetra("", 'o'),0);
	}
}
